package mycharstream;

import java.io.FileReader;
import java.io.IOException;

public class demo1 {
    public static void main(String[] args) throws IOException {
        //创建对象
        FileReader fr = new FileReader("csb.txt");
        int ch;

        //读取数据
        while ((ch = fr.read()) != -1){
            System.out.print((char) ch);
        }
        //关闭资源
        fr.close();
    }
}
